Repository navigation
feat: add PM2 monitoring source - #83
atlas-maxjb wants to merge 2 commits into
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis change adds PM2 as an agent-scoped data source. The server validates and delivers PM2 settings. The agent polls ChangesPM2 monitoring
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Server
participant Agent
participant PM2
participant EventStream
Server->>Agent: Return pm2_enabled and pm2_processes
Agent->>PM2: Execute pm2 jlist
PM2-->>Agent: Return process list
Agent->>Agent: Compare filtered snapshot with baseline
Agent->>EventStream: Emit lifecycle transition entries
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/site/docs/data-sources/pm2.md`:
- Around line 63-67: Update the troubleshooting command near the PM2 monitoring
instructions to invoke the configured executable via PM2_BIN, falling back to
pm2 when unset. Preserve the existing jlist argument and JSON verification
guidance.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 52ba02d9-754e-4149-8c6b-059ecd484d36
📒 Files selected for processing (21)
agent/internal/client/client.goagent/internal/pm2/watcher.goagent/internal/pm2/watcher_test.goagent/main.goagent/main_test.godocs/site/docs/configuration/agent-environment.mddocs/site/docs/contributing/adding-a-data-source.mddocs/site/docs/data-sources/node-capabilities.mddocs/site/docs/data-sources/overview.mddocs/site/docs/data-sources/pm2.mddocs/site/sidebars.tsserver/docs/openapi.yamlserver/internal/handlers/admin_sources.goserver/internal/handlers/admin_sources_test.goserver/internal/handlers/agent_config_test.goserver/internal/handlers/file_watcher_settings.goserver/internal/models/data_source.goweb/src/components/SourceIcon.tsxweb/src/components/sourceIcons.tsweb/src/pages/DataSourcesGroup.tsxweb/src/pages/SourceCatalog.tsx
Code review (Samaritan) —
|
Summary
pm2 jlistevery 15 seconds, baselines the first snapshot, and emits normalizedstarted,stopped,failed, andrestartentries with structured metadata.pm2capability, per-node source config/admin catalog support, exact process-name filtering, and source UI/docs/OpenAPI entries.Verification
agent:GOCACHE=/tmp/blackbox-gocache-agent GOPATH=/tmp/blackbox-gopath-agent go test ./...— PASSserver:GOCACHE=/tmp/blackbox-gocache-server GOPATH=/tmp/blackbox-gopath-server go test ./...— PASSshared:go test ./...— PASSweb:npm run build— PASSweb:npm test— PASS (19 tests)npx eslint src/components/SourceIcon.tsx src/components/sourceIcons.ts src/pages/SourceCatalog.tsx— PASSweb/npm run lintremains blocked by pre-existing errors inDemoIntroModal.tsx,useWebSocket.ts,session.tsx, and the existing state-reset rule atDataSourcesGroup.tsx:450, plus existing warnings; no PM2-specific lint errors were reported.Summary by CodeRabbit
New Features
Documentation